﻿
using MechGame.Game.PlayerRobot;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace MechGame.Game.Leveling
{
    class Gate : DoorBase
    {
        private const float GateSpeed = 4.0f;
        private const float ReactionRadius = 40f;

        private readonly int _gateLevel;

        public Gate(ContentManager content, int gateLevel)
            : base(content.Load<Texture2D>("textures/gate" + gateLevel), GateSpeed, ReactionRadius)
        {
            _gateLevel = gateLevel;
        }

        public override bool AdditionalOpenCondition(Player player)
        {
            return player.GateLevel >= _gateLevel;
        }
    }
}
